package com.zhiwang.planet.ui.search

import android.os.Bundle
import androidx.databinding.DataBindingUtil
import com.google.android.flexbox.*
import com.zhiwang.planet.R
import com.zhiwang.planet.databinding.ActivitySearchBinding
import com.zhiwang.planet.ui.BaseActivity
import kotlinx.android.synthetic.main.activity_search.*

class SearchActivity : BaseActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val binding = DataBindingUtil.setContentView<ActivitySearchBinding>(this, R.layout.activity_search)

        val flexboxLayoutManager = FlexboxLayoutManager(this).apply {
            flexWrap = FlexWrap.WRAP
            alignItems = AlignItems.CENTER
            alignContent = AlignContent.FLEX_START
            flexDirection = FlexDirection.ROW
            justifyContent = JustifyContent.FLEX_START
        }

        rv_history_records.layoutManager = flexboxLayoutManager

        rv_hot_search.layoutManager = flexboxLayoutManager
    }
}
